import inspect

def f(x):
    x += 100
    # Let's change the value of x before return
    return x

source , line = inspect.getsourcelines(f.__code__)
for i,l in enumerate(source):
    print(f"{i:3}",l)
print(line)